<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<div class="middle padtop10 myclear">
	<div class="page-content">
		
		<!-- bread crumb -->
		<p id="bread-crumb">
			<a href="<?php echo base_url();?>">
				<?php echo $lang['home']?>
			</a>
			<?php echo $lang['monitor']?>
		</p>
		<!-- end bread crumb -->
		<h3>
			<?php echo $lang['user_no_action']?>
		</h3>
		<br style="clear:both;" />
		<table class="tbl-list" width="100%" border="1">
			<tr>
				<td width="3%" class="td-label" style="text-align:center">
					<b>#</b>
				</td>
				<td class="td-label" width="8%">
					<b><?php echo $lang['user'];?></b>
				</td>
				<td width="15%" class="td-label">
					<b><?php echo $lang['fullname'];?></b>
				</td>
				<td class="td-label" width="25%">
					<b><?php echo $lang['address'];?></b>
				</td>
                <td class="td-label" style="text-align:right" width="12%">
					<b><?php echo $lang['total_balance'];?></b>
				</td>
                <td class="td-label" style="text-align:right" width="12%">
					<b><?php echo $lang['balance'];?></b>
				</td>
                <td class="td-label" style="text-align:right" width="12%">
					<b><?php echo $lang['promotion'];?></b>
				</td>
                <td class="td-label">
					<b><?php echo $lang['lasttime'];?></b>
				</td>
			</tr>
			<?php $i = 0; foreach ($items as $item){ $i++; ?>
			<tr class="row">
				<td style="text-align:center">
					<?php echo ($stt + $i);?>
				</td>
                <td>
					<?php echo $item->username;?>
				</td>
				<td>
					<?php echo $item->contact_name;?>
				</td>
				<td>
					<?php echo $item->address;?>
                     <p>
                    	<?php echo '<b>'.$lang['email'].'</b>: '.$item->email_address;?>
                    </p>
                     <p>
                    	<?php echo '<b>'.$lang['phone'].'</b>: '.$item->phone;?>
                    </p>
				</td>
				<td style="text-align:right;">
					<?php echo number_format($item->totalbalance);?>
				</td>
                <td style="text-align:right;">
					<?php echo number_format($item->balance);?>
				</td>
                <td style="text-align:right;">
					<?php echo number_format($item->promotions);?>
				</td>
                <td>
					<?php echo date('d/m/Y H:i:s', strtotime($item->lasttime));?>
				</td>
			</tr>
			<?php }?>
		</table>
        <!-- paging -->
        <div class="myclear martop20">
            <div class="brv-paging-left">
                <table class="tbl-list brv-paging" border="1">
                    <tr>
                        <td class="brv-paging-name">
                            <?php echo $lang['page'].' '. $page.' ['.$pages.']'?>
                        </td>
                        
                        <td class="brv-paging-pre-next">
                            <img class="brv-img-pre" alt="previous" src="/images/imgpre.gif" onclick="goPage(<?php echo $page > 1 ? $page - 1 : $page;?>)" />
                            <img class="brv-img-next" alt="next" src="/images/imgnext.gif" onclick="goPage(<?php echo $page < $pages ? $page + 1 : $page;?>)" />
                        </td>
                    </tr>
                </table>
            </div>
            <!-- important. fix for ie 6. Don't remove -->
            <!--[if IE 6]><br class="clearboth" /><![endif]-->
        </div>
        <!-- end paging -->
	</div>
</div><br />
<script type="text/javascript">
$(document).ready(function(){
	$('.tbl-list .row').mouseover(function(){
		$(this).css('background','#ffc');
	});
	$('.tbl-list .row').mouseout(function(){
		$(this).css('background','none');
	});
});
function goPage(strVal)
{
	window.location.href = '<?php echo site_url('monitor/userNoAction');?>/?page=' + strVal;
}
</script>